package com.ruoyi.reception;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.IdWorker;
import com.ruoyi.receipt.domain.TbUserCaAppeal;
import com.ruoyi.receipt.service.ITbUserCaAppealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户密保申诉Controller
 * 
 * @author ruoyi
 * @date 2021-03-30
 */
@RestController
@RequestMapping("/reception/userCaAppeal")
public class TbUserCaAppealRecController extends BaseController
{
    @Autowired
    private ITbUserCaAppealService tbUserCaAppealService;

    @Autowired
    private IdWorker idWorker;

    /**
     * 新增用户密保申诉
     */
    @PostMapping
    public AjaxResult add(@RequestBody TbUserCaAppeal tbUserCaAppeal)
    {
        tbUserCaAppeal.setId(idWorker.nextId());
        return toAjax(tbUserCaAppealService.insertTbUserCaAppeal(tbUserCaAppeal));
    }

}
